{extend name="admin@index_layout"/}
{block name="main"}
<form class="layui-form" method="post">
    <input name="member_id" type="hidden" value="{$data.member_id}">
    <input name="id" type="hidden" value="{$data.id}">
    <input name="food_business_license" type="hidden" value="{$data.food_business_license}">
    <input name="business_license" type="hidden" value="{$data.business_license}">
    <!--    <div class="layui-form-item">-->
    <!--        <label class="layui-form-label">申请用户名</label>-->
    <!--        <div class="layui-input-block">-->
    <!--            <input type="text" name="row[nickname]" autocomplete="off" placeholder="申请用户名" class="layui-input"-->
    <!--                   value="{$data.nickname}" readonly="readonly">-->
    <!--        </div>-->
    <!--    </div>-->
    <div class="layui-form-item">
        <label class="layui-form-label">商家名称</label>
        <div class="layui-input-block">
            <input type="text" name="row[shop_name]" autocomplete="off" placeholder="商家名称" class="layui-input"
                   value="{$data.shop_name}" readonly="readonly">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">商家联系人</label>
        <div class="layui-input-block">
            <input type="text" name="row[people]" autocomplete="off" placeholder="商家联系人" class="layui-input"
                   value="{$data.people}" readonly="readonly">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">联系电话</label>
        <div class="layui-input-block">
            <input type="text" name="row[phone]" autocomplete="off" placeholder="联系电话" class="layui-input"
                   value="{$data.phone}" readonly="readonly">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">省</label>
        <div class="layui-input-block">
            <input type="text" name="row[province]" autocomplete="off" placeholder="省" class="layui-input"
                   value="{$data.province}" readonly="readonly">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">市</label>
        <div class="layui-input-block">
            <input type="text" name="row[city]" autocomplete="off" placeholder="市" class="layui-input"
                   value="{$data.city}" readonly="readonly">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">区</label>
        <div class="layui-input-block">
            <input type="text" name="row[area]" autocomplete="off" placeholder="区" class="layui-input"
                   value="{$data.area}" readonly="readonly">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">详情地址</label>
        <div class="layui-input-block">
            <input type="text" name="row[address]" autocomplete="off" placeholder="详情地址" class="layui-input"
                   value="{$data.address}" readonly="readonly">
        </div>
    </div>

    <div class="layui-form-item">
        <label class="layui-form-label">经纬度</label>
        <div class="layui-input-block">
            <input type="text" name="" autocomplete="off" placeholder="经纬度" class="layui-input"
                   value="{$data.longitude},{$data.latitude}" readonly="readonly">
        </div>
    </div>

    <div class="layui-form-item">
        <label class="layui-form-label" >营业资质</label>
        <div class="layui-input-block">
            <ul class="layui-row list-inline plupload-preview" id="p-pic">
                {volist name="data_img" id="vo"}
                <li class="file-item thumbnail"><a href="javascript:;">
                    <img data-image=""
                         onerror="this.src='/admin/ajax/icon?suffix=png';this.onerror=null;"
                         data-original="{$vo.img}"
                         src="{$vo.img}">
                </a>
                </li>
                {/volist}
            </ul>
        </div>
    </div>


    <div class="layui-form-item">
        <label class="layui-form-label">申请备注</label>
        <div class="layui-input-block">
            <input type="text" name="row[remark]" autocomplete="off" placeholder="申请备注" class="layui-input"
                   value="{$data.remark}" readonly="readonly">
        </div>
    </div>


    <div class="layui-form-item">
        <label class="layui-form-label">审核状态</label>
        <div class="layui-input-block" id="is_c3">

            <input type="radio" name="row[status]" value="0" title="待审核" {if $data.status==0}checked{/if}
                   lay-filter="ccc3">

            <input type="radio" name="row[status]" value="1" title="审核通过" {if $data.status==1}checked{/if}
                   lay-filter="ccc3">

            <input type="radio" name="row[status]" value="3" title="审核失败" {if $data.status==3}checked{/if}
                   lay-filter="ccc3">
        </div>
    </div>

<!--    <div class="layui-form-item c3" style="display: none;">-->
<!--        <label class="layui-form-label">提现银行名称</label>-->
<!--        <div class="layui-input-block">-->
<!--            <input type="text" name="row[bank_name]" autocomplete="off" placeholder="例：中国银行"-->
<!--                   class="layui-input"-->
<!--                   value="{$data.bank_name}">-->
<!--        </div>-->
<!--    </div>-->
<!--    <div class="layui-form-item c3" style="display: none;">-->
<!--        <label class="layui-form-label">银行开户名</label>-->
<!--        <div class="layui-input-block">-->
<!--            <input type="text" name="row[bank_account_name]" autocomplete="off" placeholder="银行开户名"-->
<!--                   class="layui-input"-->
<!--                   value="{$data.bank_account_name}">-->
<!--        </div>-->
<!--    </div>-->
<!--    <div class="layui-form-item c3" style="display: none;">-->
<!--        <label class="layui-form-label">银行账号</label>-->
<!--        <div class="layui-input-block">-->
<!--            <input type="text" name="row[bank_account]" autocomplete="off" placeholder="银行账号"-->
<!--                   class="layui-input"-->
<!--                   value="{$data.bank_account}">-->
<!--        </div>-->
<!--    </div>-->
<!--    <div class="layui-form-item c3" style="display: none;">-->
<!--        <label class="layui-form-label">财务联系人</label>-->
<!--        <div class="layui-input-block">-->
<!--            <input type="text" name="row[finance_people]" autocomplete="off" placeholder="财务联系人"-->
<!--                   class="layui-input"-->
<!--                   value="{$data.finance_people}">-->
<!--        </div>-->
<!--    </div>-->
<!--    <div class="layui-form-item c3" style="display: none;">-->
<!--        <label class="layui-form-label">财务联系电话</label>-->
<!--        <div class="layui-input-block">-->
<!--            <input type="text" name="row[finance_phone]" autocomplete="off" placeholder="财务联系电话"-->
<!--                   class="layui-input"-->
<!--                   value="{$data.finance_phone}">-->
<!--        </div>-->
<!--    </div>-->

    <div class="layui-form-item r1" style="display: none;">
        <label class="layui-form-label">审核失败原因</label>
        <div class="layui-input-block">
            <input type="text" name="row[reason_refusal]" autocomplete="off" placeholder="审核失败原因" class="layui-input"
                   value="{$data.reason_refusal}">
        </div>
    </div>

<!--    <div class="layui-form-item">-->
<!--        <label class="layui-form-label">提现手续费（正数百分比）</label>-->
<!--        <div class="layui-input-block">-->
<!--            <input type="number" name="row[commission]" autocomplete="off" placeholder="手续费 100% 单位整数"-->
<!--                   class="layui-input"-->
<!--                   value="{$data.commission}">-->
<!--        </div>-->
<!--    </div>-->

    <input type="hidden" name="row[id]" value="{$data.id}">
    <div class="layui-form-item layer-footer">
        <div class="layui-input-block">
            <button class="layui-btn" lay-submit>提交</button>
        </div>
    </div>
</form>
{/block}
{block name="script"}
<script type="text/javascript">
    layui.use(['yznForm', 'form'], function () {
        var yznForm = layui.yznForm;
        var form = layui.form;
        // laydate = layui.laydate;
        var $ = layui.jquery;

        yznForm.bindevent($("form.layui-form"));
        // laydate.render({
        //     elem: '#ID-laydate'
        // });

        form.on('radio(ccc3)', function (data) {
            var status = $('#is_c3 input[name="row[status]"]:checked ').val();
            console.log(status);
            if (status == 0) {
                $(".c1").hide();
                $(".c2").hide();
                $(".c3").hide();
                $(".c32").hide();
                $(".c33").hide();
                $(".c4").hide();
                $(".c5").hide();
                $(".r1").hide();
            } else if (status == 1) {
                //console.log(111222);
                $(".c1").show();
                $(".c2").show();
                $(".c3").show();
                $(".c32").show();
                $(".c33").show();
                $(".c4").show();
                $(".c5").hide();
                $(".r1").hide();
            } else {
                $(".c1").hide();
                $(".c2").hide();
                $(".c3").hide();
                $(".c32").hide();
                $(".c33").hide();
                $(".c4").hide();
                $(".c5").hide();
                $(".r1").show();
            }
            form.render();
        });

        form.on('select(ccc6)', function (data) {
            console.log(data.value);
            if (data.value == 3) {
                $(".c5").show();
            } else{
                $(".c5").hide();
            }
            form.render();
        });

    });
</script>
{/block}